﻿namespace Trukuxzo.Samples.Creational.Patterns.ConcreteFactory
{
    #region usings
    using Trukuxzo.Samples.Creational.Patterns.AbstractFactory;
    using Trukuxzo.Samples.Creational.Patterns.AbstractProduct;
    using Trukuxzo.Samples.Creational.Patterns.Product;
    #endregion

    public class ConcreteFactoryBrowser64bits : AbstractFactoryBrowser
    {
        #region fields
        private ProductChromeBrowser64bits _Chrome64bits;
        private ProductFirefoxBrowser64bits _Firefox64bits;
        #endregion

        #region properties
        public ProductChromeBrowser64bits Chrome64bits
        {
            get
            {
                if (_Chrome64bits == null)
                    _Chrome64bits = new ProductChromeBrowser64bits();

                return _Chrome64bits;
            }
        }

        public ProductFirefoxBrowser64bits Firefox64bits
        {
            get
            {
                if (_Firefox64bits == null)
                    _Firefox64bits = new ProductFirefoxBrowser64bits();

                return _Firefox64bits;
            }
        }
        #endregion


        #region overrides
        public override AbstractProductChromeBrowser CreateProductChromeBrowser()
        {
            return Chrome64bits;
        }

        public override AbstractProductFirefoxBrowser CreateProductFirefoxBrowser()
        {
            return Firefox64bits;
        }
        #endregion
    }
}
